﻿<UserControl x:Class="EmperialApps.WeatherSpark.ForecastDisplaySelector"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:EmperialApps.WeatherSpark"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             d:DesignWidth="440">
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.Resources>
            <Style BasedOn="{StaticResource PhoneTextNormalStyle}"
                   TargetType="TextBlock">
                <Setter Property="HorizontalAlignment"
                        Value="Right" />
                <Setter Property="VerticalAlignment"
                        Value="Center" />
                <Setter Property="Margin"
                        Value="12,0,0,0" />
            </Style>

            <Style x:Key="HeaderStyle"
                   BasedOn="{StaticResource PhoneTextNormalStyle}"
                   TargetType="TextBlock">
                <Setter Property="Grid.Row"
                        Value="5" />
                <Setter Property="HorizontalAlignment"
                        Value="Center" />
                <Setter Property="Margin"
                        Value="-2,0" />
            </Style>
        </Grid.Resources>

        <TextBlock Grid.Row="0"
                   Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.Graph_Humidity}" />
        <local:DisplaySelector Grid.Column="1"
                               Grid.ColumnSpan="3"
                               Grid.Row="0"
                               Mask="HumidityMask" />

        <TextBlock Grid.Row="1"
                   Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.Graph_Pressure}" />
        <local:DisplaySelector Grid.Column="1"
                               Grid.ColumnSpan="3"
                               Grid.Row="1"
                               Mask="PressureMask" />

        <TextBlock Grid.Row="2"
                   Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.Graph_Precipitation}" />
        <local:DisplaySelector Grid.Column="1"
                               Grid.ColumnSpan="3"
                               Grid.Row="2"
                               Mask="PrecipitationMask" />

        <TextBlock Grid.Row="3"
                   Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.Graph_CloudCover}" />
        <local:DisplaySelector Grid.Column="1"
                               Grid.ColumnSpan="3"
                               Grid.Row="3"
                               Mask="CloudCoverMask" />

        <TextBlock Grid.Row="4"
                   Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.Graph_Wind}" />
        <local:DisplaySelector Grid.Column="1"
                               Grid.ColumnSpan="3"
                               Grid.Row="4"
                               Mask="WindMask" />

        <TextBlock Style="{StaticResource HeaderStyle}"
                   Grid.Column="1"
                   Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.SettingsPage_DisplayLevel_None}" />
        <TextBlock Style="{StaticResource HeaderStyle}"
                   Grid.Column="2"
                   Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.SettingsPage_DisplayLevel_Text}" />
        <TextBlock Style="{StaticResource HeaderStyle}"
                   Grid.Column="3"
                   Text="{Binding Mode=OneTime, Source={StaticResource Localized}, Path=Strings.SettingsPage_DisplayLevel_Visual}" />
    </Grid>
</UserControl>